package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlEducationMapper;
import com.ruoyi.common.core.domain.entity.SlEducation;
import com.ruoyi.sl.service.ISlEducationService;

/**
 * 学历Service业务层处理
 * 
 * @author admin
 * @date 2024-06-03
 */
@Service
public class SlEducationServiceImpl implements ISlEducationService 
{
    @Autowired
    private SlEducationMapper slEducationMapper;

    /**
     * 查询学历
     * 
     * @param educationId 学历主键
     * @return 学历
     */
    @Override
    public SlEducation selectSlEducationByEducationId(Long educationId)
    {
        return slEducationMapper.selectSlEducationByEducationId(educationId);
    }

    /**
     * 查询学历列表
     * 
     * @param slEducation 学历
     * @return 学历
     */
    @Override
    public List<SlEducation> selectSlEducationList(SlEducation slEducation)
    {
        return slEducationMapper.selectSlEducationList(slEducation);
    }

    /**
     * 查询所有学历
     *
     * @return 学历集合
     */
    @Override
    public List<SlEducation> selectEducationAll()
    {
        return slEducationMapper.selectEducationAll();
    }

    /**
     * 新增学历
     * 
     * @param slEducation 学历
     * @return 结果
     */
    @Override
    public int insertSlEducation(SlEducation slEducation)
    {
        slEducation.setCreateTime(DateUtils.getNowDate());
        return slEducationMapper.insertSlEducation(slEducation);
    }

    /**
     * 修改学历
     * 
     * @param slEducation 学历
     * @return 结果
     */
    @Override
    public int updateSlEducation(SlEducation slEducation)
    {
        slEducation.setUpdateTime(DateUtils.getNowDate());
        return slEducationMapper.updateSlEducation(slEducation);
    }

    /**
     * 批量删除学历
     * 
     * @param educationIds 需要删除的学历主键
     * @return 结果
     */
    @Override
    public int deleteSlEducationByEducationIds(Long[] educationIds)
    {
        return slEducationMapper.deleteSlEducationByEducationIds(educationIds);
    }

    /**
     * 删除学历信息
     * 
     * @param educationId 学历主键
     * @return 结果
     */
    @Override
    public int deleteSlEducationByEducationId(Long educationId)
    {
        return slEducationMapper.deleteSlEducationByEducationId(educationId);
    }
}
